#include "Client.hpp"
#include <memory>
using namespace std;
using namespace Client;

static void Usage(string proc)
{
    cout << "\nUsage:\n\t" << proc << " Server_IP Server_Port\n\n"
         << endl;
}

int main(int argc, char *argv[]) // 参数个数，以及参数列表
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    string serverIP = argv[1];
    uint16_t serverPort = atoi(argv[2]);

    unique_ptr<UdpClient> uqtr(new UdpClient(serverIP, serverPort));
    uqtr->InitClient();
    uqtr->Run();
    return 0;
}